package com.zzzy.cont.dao.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zzzy.cont.dao.entity.Contract;
import com.zzzy.cont.dto.ContractStatusCountDto;
import com.zzzy.cont.vo.contract.dept.DeptConPageReq;
import com.zzzy.framework.core.mybatis.mapper.BaseMapperE;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * 合同基本信息 Mapper 接口
 *
 * @author fc
 * @since 2024-05-27
 */
public interface ContractMapper extends BaseMapperE<Contract> {

    IPage<Contract> selectDeptConPage(IPage<Contract> mpPage, @Param("queryReq") DeptConPageReq queryReq, @Param("userIdSet")  Set<Long> userIdSet);

    IPage<Contract> selectAllDeptConPage(IPage<Contract> mpPage, @Param("queryReq") DeptConPageReq queryReq);

    /**
     * 查询我的合同-个状态合同数量
     * @param userId
     * @return
     */
    List<ContractStatusCountDto> selectMyContractStatusCountList(Long userId);

    /**
     * 查询办理合同-已办合同数量
     * @param userId
     * @return
     */
    long selectProcessedCount(Long userId);
}
